package com.itpengwei.strategy;

import lombok.Data;

/**
 * @author: pengwei
 * @date: 2019/11/28 2:39 下午
 * 策略上下文
 */
@Data
public  class PaymentContext {
    private PaymentMethodBase paymentMethodBase;

    /**
     * @param totalmoney 总金额
     * @return 获取结果
     */
    public double getResult(double totalmoney) {
        return paymentMethodBase.payment(totalmoney);
    }
}
